project(roborts_decision)
cmake_minimum_required(VERSION 3.1)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_module)
set(CMAKE_BUILD_TYPE Release)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  tf
  nav_msgs
  geometry_msgs
  actionlib
  roborts_common
  roborts_msgs
  roborts_costmap
  )

find_package(Eigen3 REQUIRED)
find_package(ProtoBuf REQUIRED)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

#generate proto files
file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto")
rrts_protobuf_generate_cpp(${CMAKE_CURRENT_SOURCE_DIR}/proto
  DecisionProtoSrc
  DecisionProtoHds
  ${ProtoFiles}
  )

catkin_package()

add_executable(behavior_test_node
  ${DecisionProtoHds}
  ${DecisionProtoSrc}
  example_behavior/escape_behavior.h
  example_behavior/back_boot_area_behavior.h
  example_behavior/chase_behavior.h
  example_behavior/patrol_behavior.h
  example_behavior/search_behavior.h
  example_behavior/gogoal_behavior.h
  example_behavior/circle_behavior.h
  example_behavior/wait_behavior.h
  executor/chassis_executor.cpp
  executor/gimbal_executor.cpp
  example_behavior/under_attack_behavior.h
  example_behavior/bfs_search.h
  example_behavior/buff_behavior.h
  example_behavior/blood_behavior.h
  example_behavior/attack_behavior.h
  example_behavior/recovery.h
  #example_behavior/cover_behavior.h
  #tree_test.cpp
  behavior_test.cpp
  #tree1.cpp
  #tree_chase.cpp
  #tree_fight.cpp
  #tree_blind.cpp
  #tree_fire.cpp
  #tree_used.cpp
  #tree_recovery.cpp
  example_behavior/gimbalget0_behavior.h
  example_behavior/shake_behavior.h
  example_behavior/dance_behavior.h
  example_behavior/camera_behavior.h
  example_behavior/gimbal_aim_behavior.h
  example_behavior/prepare_behavior.h
  example_behavior/attack_enemy_buff_behavior.h
  )

add_executable(tree_used_node
  ${DecisionProtoHds}
  ${DecisionProtoSrc}
  example_behavior/escape_behavior.h
  example_behavior/back_boot_area_behavior.h
  example_behavior/chase_behavior.h
  example_behavior/patrol_behavior.h
  example_behavior/search_behavior.h
  example_behavior/gogoal_behavior.h
  example_behavior/circle_behavior.h
  example_behavior/wait_behavior.h
  executor/chassis_executor.cpp
  executor/gimbal_executor.cpp
  example_behavior/under_attack_behavior.h
  example_behavior/bfs_search.h
  example_behavior/buff_behavior.h
  example_behavior/blood_behavior.h
  example_behavior/attack_behavior.h
  example_behavior/recovery.h
  #example_behavior/cover_behavior.h
  #tree_test.cpp
  #behavior_test.cpp
  #tree1.cpp
  #tree_chase.cpp
  #tree_fight.cpp
  #tree_blind.cpp
  # tree_fire.cpp
   tree_used.cpp
  #tree_recovery.cpp
  example_behavior/gimbalget0_behavior.h
  example_behavior/shake_behavior.h
  example_behavior/dance_behavior.h
  example_behavior/camera_behavior.h
  example_behavior/gimbal_aim_behavior.h
  example_behavior/prepare_behavior.h
  example_behavior/attack_enemy_buff_behavior.h
)

target_link_libraries(behavior_test_node
  PRIVATE
  roborts_costmap
  ${catkin_LIBRARIES}
  ${PROTOBUF_LIBRARIES}
  )
add_dependencies(behavior_test_node
  roborts_msgs_generate_messages)

target_link_libraries(tree_used_node
  PRIVATE
  roborts_costmap
  ${catkin_LIBRARIES}
  ${PROTOBUF_LIBRARIES}
  )
add_dependencies(tree_used_node
  roborts_msgs_generate_messages)
